﻿<!DOCTYPE html>

<html>

	<head>
		<meta charset="utf-8">
		<title>LMB-SVN - 用户添加</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<script src="${httpRootPath}/resources/layui/layui.js" charset="utf-8"></script>
		<link rel="stylesheet" href="${httpRootPath}/resources/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="${httpRootPath}/resources/main/css/global.css">
	</head>

	<body>
	<#include "/z_head.html"/>
	<div class="layui-main site-inline">
		<div class="site-content">
			<h1 class="site-h1">修改密码</h1>
			<div class="layui-main">
				<blockquote class="layui-elem-quote">
					<form class="layui-form" action="">
						<div class="layui-form-item">
							<label class="layui-form-label">旧  密  码：</label>
							<div class="layui-input-block">
								<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入旧密码" class="layui-input">
							</div>
						</div>

						<div class="layui-form-item">
							<label class="layui-form-label">新  密  码：</label>
							<div class="layui-input-block">
								<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入新密码" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">密码确认：</label>
							<div class="layui-input-block">
								<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请再次输入新密码" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit="" lay-filter="demo1">确认修改</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</div>
					</form>
				</blockquote>
			</div>
		</div>
	</div>

	<script>
        layui.use(['form', 'layedit', 'laydate', 'element'], function(){
            var form = layui.form()
                ,layer = layui.layer
                ,layedit = layui.layedit
                ,laydate = layui.laydate
                ,element = layui.element();


            //自定义验证规则
            form.verify({
                title: function(value){
                    if(value.length < 5){
                        return '标题至少得5个字符啊';
                    }
                }
                ,pass: [/(.+){6,12}$/, '密码必须6到12位']
                ,content: function(value){
                    layedit.sync(editIndex);
                }
            });

            //监听提交
            form.on('submit(demo1)', function(data){
                layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                })
                return false;
            });
        });
	</script>
	</body>
</html>